-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add int test for flannel-ipv6masq #10440
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #10440 +/- ##
==========================================
- Coverage 41.78% 39.02% -2.76%
==========================================
Files 177 177
Lines 14806 14830 +24
==========================================
- Hits 6186 5788 -398
- Misses 7443 7897 +454
+ Partials 1177 1145 -32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
podname, err := testutil.K3sCmd("kubectl", "get", "pods", "-n", "kube-system", "-o", "jsonpath={.items[?(@.metadata.labels.app\\.kubernetes\\.io/name==\"traefik\")].metadata.name}") | ||
Expect(err).NotTo(HaveOccurred()) | ||
Eventually(func() (string, error) { | ||
return testutil.K3sCmd("kubectl", "exec", podname, "-n", "kube-system", "--", "ip", "a") | ||
}, "5s", "1s").Should(ContainSubstring("2001:cafe:42:")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Do you really need to exec into the pod to do this? The IPs are exposed via
pod.status.podIPs
:
kubectl get pod -n kube-system -l app.kubernetes.io/name=traefik -o "jsonpath={.items[].status.podIPs[].ip}"
You should also use a label selector instead of filtering by name in the jsonpath expression... - If you really want to exec into the pod to get this info, you can do so in one line (without listing the pods first) by running:
kubectl exec -n kube-system deployment/traefik -c traefik -- ip a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point about the one liner, I'll change the dualStack int test as well. I would like to get into the pod network namespace and verify that the podIP is really assigned to the interface. 99% of the time {.items[].status.podIPs[].ip}
will be the same but I remember once there was a bug and the interface was not assigned the IP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you review again please? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add this test to the CI matrix https://github.com/k3s-io/k3s/blob/master/.github/workflows/integration.yaml#L41
Signed-off-by: Manuel Buil <[email protected]>
b45d18c
to
e5079ce
Compare
The problem is that it requires dualStack to be available... :( |
Proposed Changes
Add a new integration test to verify k3s works as expected when deploying with
--flannel-ipv6-masq
.Adds also a log when running the integration test. Otherwise it seems like we are stuck at
waiting to get test lock
when running the test manuallyTypes of Changes
New test
Verification
Testing
Linked Issues
#10419
User-Facing Change
Further Comments